<include file="../header" />
<body class="J_scroll_fixed">
    <script>


    </script>
<form class="well form-search" method="post" style="float:left" action="{:U('order/index')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
            状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：{:getEnumSelectWidget($statusEnum, "o#status", $status, 1)}
            &nbsp;用户名称：<input type="text" name="cus#nickname-like" value="{$nickname}" />
            产品名称：<input type="text" name="p#product_name-like" value="{$product_name}" />
            <br>下单开始时间：<input type="text" value="{$begin_time}" class="date J_date" name="o#create_time-egt" />
            下单截止时间：<input type="text" value="{$end_time}" class="date J_date" name="o#create_time-elt" />
            <button class="btn btn-primary" type="submit">搜索</button>
            <a class="btn" href="{:U('order/index')}">重置</a>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>订单号</th>
            <th>用户名称</th>
            <th>产品信息</th>
            <th>产品测量结果</th>
            <th>备注</th>
            <th>需要发票</th>
            <th>收货人</th>
            <th>创建时间</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="orderList" item="vo">
            <tr>
                <td>{$vo.order_id}<br>{$vo.out_trade_no}</td>
                <td>{$vo.nickname}<br>医生：{$vo.doctor_name}<br>医院：{$vo.hospital_name}</td>
                <td>{$vo.product_name}X{$vo.number}件<br>总计：{$vo.price}元</td>
                <td>{$vo.measure_result}</td>
                <td>{$vo.note}</td>
                <td>{:getEnumString($defaultEnum, $vo['need_invoice'])}&nbsp;<br>{$vo.invoice_name} <br>{$vo.invoice_number}</td>
                <td>{$vo.receive_name}，{$vo.receive_contact}，配送：{$vo.delivery_type}<br>{$vo.receive_address}<br>{$vo.express_company} {$vo.delivery_number}</td>
                <td>{$vo.create_time}</td>
                <td>{:getEnumString($statusEnum, $vo['status'])}</td>
                <td>
                    <if condition="$vo['status'] eq $statusEnum['WAITING_HANDLE']">
                        <a class="btn btn-success" href='{:U("order/endDelivery",array("id"=>$vo["order_id"]))}'>已出库</a>
                    </if>
                    <if condition="$vo['need_measure'] eq 1">
                        <a class="btn btn-info" href='{:U("order/viewMeasureData",array("id"=>$vo["order_id"]))}'>查看测量信息</a>
                    </if>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>